#!/bin/bash
#for i in {1..10}
#do
#    logger -t $var_logSource Automatic log message ! " ($i)"
#done
##############################################################

var_fileName=$1
var_logSource=$2
var_i=0
var_level="notice"

# index file
cat $var_fileName | while read line
do
	var_i="$(($RANDOM % 8))"

	if [ "$var_i" = "1" ]; then
		var_level="alert"
	elif [ "$var_i" = "2" ]; then
		var_level="crit"
	elif [ "$var_i" = "3" ]; then
		var_level="error"
	elif [ "$var_i" = "4" ]; then
		var_level="warning"
	elif [ "$var_i" = "5" ]; then
		var_level="notice"
	elif [ "$var"_i = "6" ]; then
		var_level="info"
	else
		var_level="debug"
	fi	

	logger -i -p "user.$var_level" -t "$var_logSource" "$line"

	sleep 1
done




